package com.epoch.app.otsapplicationreportsdk.errorcode;

import com.alibaba.lattice2.epoch.exception.IEpochErrorCode;
import com.alibaba.lattice2.epoch.sdk.proxy.EpochErrorCodeProxy;
import java.text.MessageFormat;

public enum OtsApplicationReportSdkErrorCode implements IEpochErrorCode {


    /**
    * 统计日期不能为空
    */
    OARS_REPORT_001("oars-report-001");

    private String code;

    OtsApplicationReportSdkErrorCode(String code) {
        this.code = code;
    }

    @Override
    public String getAppCode() {
        return "ots_application_report_sdk";
    }

    @Override
    public String getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return EpochErrorCodeProxy.get("ots_application_report_sdk", this.code).replaceAll("\\$", "");
    }

    public String getMessage(String... arg) {
        return MessageFormat.format(EpochErrorCodeProxy.get("ots_application_report_sdk", this.code).replaceAll("\\$", ""), arg);
    }

}
